import request from '@/utils/request'

export function page(query) {
  return request({
    url: '/api/admin/notification/page',
    method: 'get',
    params: query
  })
}

// 角色列表
export function list(groupType) {
  return request({
    url: '/api/admin/group/list',
    method: 'get',
    params: { groupType }
  })
}

// 用户列表
export function selectuserAll(name) {
  return request({
    url: '/api/admin/user/selectUserAll',
    method: 'get',
    params: name
  })
}

// 公告列表
export function notificationQuery(name) {
  return request({
    url: '/api/admin/notification/query',
    method: 'get',
    params: name
  })
}

// 公告失效PUT /notification/invalid
export function invalid(query) {
  return request({
    url: '/api/admin/notification/invalid',
    method: 'put',
    data: query
  })
}

// 公告删除 DELETE /notification/deleteNotification
export function deleteNotification(query) {
  return request({
    url: '/api/admin/notification/deleteNotification',
    method: 'delete',
    data: query
  })
}